<?php

class reservations_has_passengers_model extends MY_Model {

     function __construct() {
          parent::__construct();
          $this->table = 'reservations_has_passengers';
     }

     public function find_top_passenger($reservation_ID) {

          $q = "
                  SELECT passengers_ID 
                  FROM reservations_has_passengers 
                  WHERE reservations_ID = ?
                  LIMIT 1
               ";

          $res = $this->db->query($q, array($reservation_ID))->row_array();
          return $res;
     }

}

?>
